#include <iostream>
#include <stdio.h>

using namespace std;

struct Node
{
    int data;
    Node *next;
    Node *pre;
};

int main()
{
    Node *p, *r;
    Node *head = new Node;
    Node *tail = head;

    int n;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        p = new Node;
        cin >> p->data;
        p->next = nullptr;

        p->pre = tail;
        tail->next = p;

        tail = p;
    }

    for (p = tail; p != head; p = p->pre)
    {
        cout << p->data << ' ';
    }
    return 0;
}